package java_collection.set;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class RemoveAllTest {

	public static void main(String[] args) {
		
		Set<Integer> set = new HashSet<>();
		set.addAll(Arrays.asList(1,2,3,4,5));
		
		// Set = [1,2,3,4,5]
		// removing 1,2,3 from set
		set.removeAll(Arrays.asList(1,2,3));
		// Set = [4,5]
		
		print(set);
		
	}
	
	static void print(Collection<Integer> collection){
		for(Integer c: collection){
			System.out.println(c);
		}
	}

}
